/**
 * @author 
 * 
 */
var sort = null;
var grid = null;
function initgenzonglist(){
var colModel = new Ext.grid.ColumnModel([
		{header:'标题',dataIndex:'title',menuDisabled : true},
		{header:'时间',dataIndex:'dateTime1',menuDisabled : true},
		{header:'姓名状态',dataIndex:'anonymity1',menuDisabled : true},
		{header:'状态',dataIndex:'status1',menuDisabled : true},
        {header:'id',dataIndex:'id',hidden:true},		
		{header:'操作',dataIndex:'operate',menuDisabled : true,renderer:function(s,m,rec){
		   return "<a href="+"javascript:toOpinion('"+rec.data.id+"')>进入</a>";
		}}
	]);
	var url = Ext.get('url').getValue();
	sort = new Ext.data.JsonStore({
		url:url,
		fields:['title','dateTime1','anonymity1','status1','id','operate'],
		root:'root',
		totalProperty:'totalProperty'
	});
	var bbar = new Ext.PagingToolbar({
		pageSize:25,
		store:sort,
		displayInfo:true,
		emptyMsg:'没有记录'
	});
	
	 grid = new Ext.grid.GridPanel({
		title:'意见箱查看',
		cm:colModel,
		renderTo:'topic-grid',
		store:sort,
		loadMask:true,
		autoHeight:true,
		bbar:bbar,
		viewConfig:{
			forceFit:true
		}
	});
	if(Ext.get('startid')){
		start = Ext.get('startid').getValue();
		sort.load({params:{start:0, limit: 25},callback:function(){
			grid.hide();
			bbar.hide();
			bbar.changePage(Ext.get('page').getValue());
			grid.show();
			bbar.show();
		}});
		return;
	}
	else
	{
		sort.load({params:{start:0, limit: 25}});
	}
}

	function toOpinion(id){
	   window.location.href=Ext.get('basePath').getValue()+'tjsinfo/tjsoa/vote/toOpinionBox.do?method=opinionBoxCon&id='+id;
	}




	
	